import java.util.*;

public class task5 {

	public static int[] largerElements(int[] x, int v) {
		
		int size = 0;
		
		for(int i=0; i<10 ; i++)
			if(x[i]>v)
				size++;
		int k = 0;
		int[] y = new int[size];
		
		for(int i=0; i<10 ; i++)
		{
			if(x[i]>v)
			{
				y[k] = x[i];
				k++;
			}
		}
			
				
			
		return y;
	}
	
public static void printArray(int[] y,int v){
		
		System.out.printf("The array elements larger than %d are:",v);
		
		for(int i=0 ; i<y.length ; i++)
			System.out.printf("%d ", y[i]);
		
	}
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int[] x = new int[10];
		
		System.out.println("Enter 10 integer values:");
		
		for(int i=0; i<10 ; i++)
			x[i] = sc.nextInt();
		
		System.out.print("Enter an integer value:");
		int v = sc.nextInt();
		
		int[] y;
		
		y = largerElements(x,v);
		
		printArray(y,v);
		
		
		
		sc.close();
	}

}
